//
//  TestMemoryVC.m
//  技术点总结
//
//  Created by tianlong on 2018/6/13.
//  Copyright © 2018年 tianlong. All rights reserved.
//

#import "TestMemoryVC.h"
#include<unistd.h>
#include<stdio.h>
#include<sys/mman.h>
#include<fcntl.h>
#include<stdlib.h>

#import <sys/types.h>
#import <sys/sysctl.h>
#import <mach/host_info.h>
#import <mach/mach_host.h>
#import <mach/task_info.h>
#import <mach/task.h>

#import "Person.h"

#define NRECORDS (100)

@interface TestMemoryVC ()

@end

@implementation TestMemoryVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    Person *p = [[Person alloc] init];
    p.name = @"haha";
    
    NSString *str = @"123";
    NSString *str_add = [NSString stringWithFormat:@"%p",str];
    for (int i = 0; i < str_add.length; i++) {

    }
    NSLog(@"str_add = %@", str_add);

    
//    char test[1000];
//    strcpy(test,(char *)[str UTF8String]);
//    test[1]='3';
    
    char test[1000] = {'1','2','3','\0'};
    NSLog(@"test = %s",test);
    test[1]='3';
    NSLog(@"test = %s",test);



}


@end
